package com.jurassic.demo;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

/**
 * @Author pan_jin
 * @Description: $
 * @Date: 2022/7/11 20:19
 * @Version: 1.0.0
 * @Slogan: 梦想还是要有的万一实现了呢
 */
@ComponentScan
@Configuration
@EnableWebMvc
//@EnableAspectJAutoProxy
@EnableScheduling
@EnableTransactionManagement
@PropertySource({"classpath:/jdbc.properties","classpath:/app.properties"})
public class AppConfig {
//    @Autowired
//    SchedulingService schedulingService;
//    public static void main(String[] args) {
//        try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class)) {
//            SchedulingService mailService=   context.getBean(SchedulingService.class);
//            mailService.schedulingTest();
//           UserService userService= context.getBean(UserService.class);
//           userService.logging();
//            userService.getUserById("12");
//            System.out.println("mailService.getClass().toString() = " + mailService.getClass().toString());
//        }
//    }
}
